package tag;

import java.io.IOException;
import java.io.StringWriter;
import java.util.Date;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;

public class HelloBodyTag extends SimpleTagSupport {

	public HelloBodyTag(){
		
	}
	public void doTag(){
		StringWriter sw = new StringWriter();
		try {
			getJspBody().invoke(sw);
			Date date = new Date();
			getJspContext().getOut().println(sw.toString()+"  "+date.toString());
		} catch (JspException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
}
